package com.example.dao;

import com.example.domain.Category;
import org.apache.ibatis.annotations.*;

import java.util.List;
//获取所有分类
public interface CategoryMapper {
    @Select("SELECT * FROM category")
    @Results(id = "categoryMap", value = {
            @Result(id = true, column = "id", property = "id"),
            @Result(column = "name", property = "name")
    })
    List<Category> findAll();
}